<%@ page import="com.dbb.entity.company.Company" %>



<div class="fieldcontain ${hasErrors(bean: companyInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="company.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${companyInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: companyInstance, field: 'address', 'error')} ">
	<label for="address">
		<g:message code="company.address.label" default="Address" />
		
	</label>
	<g:textField name="address" value="${companyInstance?.address}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: companyInstance, field: 'addressEn', 'error')} ">
	<label for="addressEn">
		<g:message code="company.addressEn.label" default="Address En" />
		
	</label>
	<g:textField name="addressEn" value="${companyInstance?.addressEn}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: companyInstance, field: 'cnName', 'error')} ">
	<label for="cnName">
		<g:message code="company.cnName.label" default="Cn Name" />
		
	</label>
	<g:textField name="cnName" value="${companyInstance?.cnName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: companyInstance, field: 'contact', 'error')} ">
	<label for="contact">
		<g:message code="company.contact.label" default="Contact" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${companyInstance?.contact?}" var="c">
    <li><g:link controller="contact" action="show" id="${c.id}">${c?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="contact" action="create" params="['company.id': companyInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'contact.label', default: 'Contact')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: companyInstance, field: 'expressAdd', 'error')} ">
	<label for="expressAdd">
		<g:message code="company.expressAdd.label" default="Express Add" />
		
	</label>
	<g:textField name="expressAdd" value="${companyInstance?.expressAdd}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: companyInstance, field: 'fax', 'error')} ">
	<label for="fax">
		<g:message code="company.fax.label" default="Fax" />
		
	</label>
	<g:textField name="fax" value="${companyInstance?.fax}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: companyInstance, field: 'tel', 'error')} ">
	<label for="tel">
		<g:message code="company.tel.label" default="Tel" />
		
	</label>
	<g:textField name="tel" value="${companyInstance?.tel}"/>
</div>

